{
    type myReturnType<T extends (...arg: any[]) => any> = T extends (...arg: any[]) => infer R ? R : never;


    type testReturnType = myReturnType<({ name: string }) => void>

    type testReturnType2 = myReturnType<({ name: string }) => boolean>
}